import request from "@/utils/request";
/**
 * 首页
 * @returns {*}
 */
export function getHomeData() {
  return request.get("index", {}, { login: false });
}

/**
 * 系统启动简介图
 * @returns {*}
 */
export function getLoadigImages() {
  return request.get("getNavigationPic", {}, { login: false });
}

/**
 * 系统配置参数
 * @returns {*}
 */
export function getSystemConfigData() {
  return request.get("getSystemConfigData", {}, { login: false });
}

/**
 * 产品协议
 * @returns {*}
 */
export function getDealPic() {
  return request.get("product/getDealPic", {}, { login: false });
}

/**
 * 关于梦聚成星
 * @returns {*}
 */
export function getAbout() {
  return request.get("getAboutImages", {}, { login: false });
}

/**
 * 商学院
 * @returns {*}
 */
export function getBusinessData() {
  return request.get("business/queryAll", {}, { login: true });
}

/**
 * 商学院课件详情
 * @returns {*}
 */
export function getBusinessDetailData(id) {
  return request.get("business/detail/" + id, {}, { login: true });
}

/**
 * 商学院课件详情
 * @returns {*}
 */
export function getBusinessAudio(id) {
  return request.get("businessDetail/detail/" + id, {}, { login: true });
}

/**
 * 问卷调查
 * @returns {*}
 */
export function getQuestionList(typeId) {
  return request.get("/question/getQuestionList/" + typeId, {}, { login: true });
}


/**
 * 抽奖活动获取奖品数据
 * @returns {*}
 */
export function getPrizeData(id) {
  return request.get("prize/open/" + id, {}, { login: true });
}

/**
 * 抽奖活动中奖奖品
 * @returns {*}
 */
export function getWinThePrize(id) {
  return request.get("prize/begin/" + id, {}, { login: true });
}


/**
 * 抽奖活动获取中奖记录
 * @returns {*}
 */
export function getWinThePrizeRecord(id) {
  return request.get("prize/record/" + id, {}, { login: true });
}




/**
 * 文章 轮播列表
 * @returns {*}
 */
export function getArticleBanner() {
  return request.get("/article/banner/list", {}, { login: false });
}

/**
 * 文章分类列表
 * @returns {*}
 */
export function getArticleCategory() {
  return request.get("/article/category/list", {}, { login: false });
}

/**
 * 文章 热门列表
 * @returns {*}
 */
export function getArticleHotList() {
  return request.get("/article/hot/list", {}, { login: false });
}

/**
 * 文章列表
 * @returns {*}
 */
export function getArticleList(q) {
  return request.get("/article/list/", q, { login: false });
}

/**
 * 分享
 * @returns {*}
 */
export function getShare() {
  return request.get("/share", {}, { login: false });
}

/**
 * 文章详情
 * @returns {*}
 */
export function getArticleDetails(id) {
  return request.get("/article/details/" + id, {}, { login: false });
}

/**
 * 获取微信sdk配置
 * @returns {*}
 */
export function getWechatConfig() {
  return request.get(
    "/wechat/config",
    { url: location.href },
    { login: false }
  );
}

/**
 * 获取微信sdk配置
 * @returns {*}
 */
export function wechatAuth(code, spread, login_type) {
  return request.get(
    "/wechat/auth",
    { code, spread, login_type },
    { login: false }
  );
}
/**
 * 获取快递公司
 * @returns {*}
 */
export function getLogistics() {
  return request.get("/logistics", {}, { login: false });
}

/**
 * 获取图片base64
 * @retins {*}
 * */
export function imageBase64(image, code) {
  return request.post(
    "/image_base64",
    { image: image, code: code },
    { login: false }
  );
}


/*
 * 获取服务器当前时间
 * */
export function getCurrentDate() {
	return request.get("/getCurrentDate", {}, { login: false });
}
